@extends('admin_system/public/layout')
@section('content')
    <div class="col-xs-12 nav top-nav">
        <p class="float-left nav-path"><strong>当前位置：</strong>分会管理>>分会列表</p>

        <a class="float-right btn btn-danger" href="{{asset('admin_system/chapter/chapterEdit')}}">添加分会</a>

    </div>

    <div class="content-box col-xs-12 mt20 pb20 pt20">

        <form class="form-inline nav mb10" method="get" action="{{asset('admin_system/chapter/chapters')}}">
            <div class="form-group">
                <div class="input-group">
                    <div class="input-group-addon">查询</div>
                    <input name="keywords" class="form-control"  placeholder="按公司名称查询" value="{{$keywords}}">
                    {{csrf_field()}}
                </div>
            </div>
            <button type="submit" class="btn btn-primary">搜索</button>
        </form>


        <table class="table table-hover table-bordered">
            <tr>
                <th>序号</th>
                <th>名称</th>
                <th>发起人</th>
                <th>会长总数</th>
                <th>学习官总数</th>
                <th>企业总数</th>
                <th>会员总数</th>
                <th>操作</th>
            </tr>

            @foreach($chapters as $chapter)
                <tr>
                    <td>{{$loop->iteration + ($chapters->currentPage()-1)*$chapters->perPage()}}</td>
                    <td>{{$chapter->chapter_name}}</td>
                    <td>{{$chapter->YourName}}</td>
                    <td><a href="{{asset('admin_system/chapter/prisidents?chapterId='.$chapter->chapter_id)}}">{{$chapter->prisidentNum}}</a></td>
                    <td><a href="{{asset('admin_system/chapter/drps?chapterId='.$chapter->chapter_id)}}">{{$chapter->drpNum}}</a></td>
                    <td><a href="{{asset('admin_system/chapter/companys?chapterId='.$chapter->chapter_id)}}">{{$chapter->companyNum}}</a></td>
                    <td><a href="{{asset('admin_system/chapter/members?chapterId='.$chapter->chapter_id)}}">{{$chapter->memberNum}}</a></td>
                    <td>
                        <a href="{{asset('admin_system/chapter/chapterEdit?chapterId='.$chapter->chapter_id)}}" class="btn btn-xs btn-info">编辑</a>
                        <a href="{{asset('admin_system/chapter/chapterDelete?chapterId='.$chapter->chapter_id)}}" onclick="return confirm('确定删除吗')"; class="btn btn-xs btn-danger">删除</a>
                        <a href="{{asset('admin_system/chapter/prisidentEditIndex?chapterId='.$chapter->chapter_id)}}" class="btn btn-xs btn-danger">添加会长</a>
                    </td>
                </tr>
            @endforeach
        </table>
        {!! $chapters->appends([])->links() !!}
    </div>
@endsection
